Tested on a TexLive distribution using XeLaTeX. I cannot guarantee that other formats or LaTeX engines will work. (In fact, they probably won’t.)
In addition, this particular example assumes that you have the Arial Narrow font installed on your system.
## Loading required package: pacman
pacman::p_load(ggplot2, hrbrthemes)
ggplot(mtcars, aes(mpg, wt)) +
geom_point() +
labs(x="Fuel efficiency (mpg)", y="Weight (tons)",
title="This plot uses Arial Narrow fonts",
caption="Note: Fonts must be installed separately on your system.") +
theme_ipsum()Multi-column environments are supported via’s Pandoc’s fenced_divs syntax. For example, a two-column section would look like this.
Here is some example dplyr code.
## # A tibble: 2 x 2
## am `mean(mpg)`
## <dbl> <dbl>
## 1 0 17.1
## 2 1 24.4
Â
The same idea can be extended to additional columns and the individual column widths are also adjustable.
In general, this template tries to do a good job of automatically handling (i.e. ignoring) interactive content when exporting to PDF. A notable exception is with embedded interactive content like external GIFs. In this case, rather than typing the usual, say,  directly in the Rmd file, you should include the figure with knitr::include_graphics in an R chunk. This will allow you to control whether it renders, conditional on output format. For example: